Skip to content

L2 contracts re-deployment#119

Merged
JoE11-y merged 4 commits intoExplore-Beyond-Innovations:mainfrom
truthixify:fix-117
Aug 26, 2025
Merged

L2 contracts re-deployment#119
JoE11-y merged 4 commits intoExplore-Beyond-Innovations:mainfrom
truthixify:fix-117

Conversation

@truthixify
Copy link
Contributor

@truthixify truthixify commented Aug 26, 2025

This PR fixes an issue with L2 contract deployment.

Changes

  • ZeroXBridgeL2.cairo: removed unnecessary println! statements that caused contract declaration failures
  • Updated RPC to v8
  • Updated starknet.js to v7.6.4

Closes #117

Summary by CodeRabbit

  • New Features

    • Published updated L2 contract ABIs for oracle, bridge, token, and proof registry (new public interfaces, constructors, and events).
    • Deployment now logs per-contract processing and automatically saves fetched ABIs.
  • Refactor

    • Removed debug printouts from the L2 bridge contract for cleaner runtime output.
  • Documentation

    • Updated network RPC URLs and refreshed Sepolia deployed contract addresses.
  • Chores

    • Bumped StarkNet dependency version.

@coderabbitai
Copy link

coderabbitai bot commented Aug 26, 2025

Walkthrough

Bumped StarkNet SDK, updated Sepolia RPC and deployment config, refreshed Sepolia deployment records, added ABI JSONs for L2 contracts, updated deploy script to fetch/save ABIs and pass a DeploymentConfig, and removed three debug println! calls from ZeroXBridgeL2.cairo.

Changes

Cohort / File(s) Summary
Dependency
contracts/L2/package.json
Bumped starknet dependency from ^6.24.1 to ^7.6.4.
Deploy configuration
contracts/L2/scripts/.deploy-config-sepolia.json
Updated accountAddress, owner, and starknetRpcUrl (v0_7 → v0_8).
Deploy script & helpers
contracts/L2/scripts/deploy_l2.ts
Moved default sepolia/mainnet RPC endpoints to v0_8; declareAndDeploy and deployment helper signatures now accept DeploymentConfig; added per-contract "Processing ..." log; fetches ABI via RpcProvider.getClassAt(address) and writes contracts/L2/abi/{contractName}.abi.json.
Deployment records
contracts/L2/scripts/deployments-sepolia.json
Replaced addresses, class hashes, tx hashes, and timestamps for ProofRegistry, L2Oracle, xZBERC20, and ZeroXBridgeL2 (Sepolia).
Contract code (debug cleanup)
contracts/L2/src/core/ZeroXBridgeL2.cairo
Removed three println! debug statements from append_withdrawal_hash; core logic unchanged.
README
contracts/L2/README.md
Updated network RPC URLs (sepolia/mainnet → v0_8) and refreshed Sepolia deployed contract addresses/links.
Generated ABIs
contracts/L2/abi/*.abi.json
Added ABI files for L2Oracle, ProofRegistry, ZeroXBridgeL2, and xZBERC20 describing public interfaces, types, constructors, and events.

Sequence Diagram(s)

sequenceDiagram
    participant DeployScript as deploy_l2.ts
    participant StarknetRPC as RpcProvider
    participant FS as FileSystem

    Note over DeployScript,StarknetRPC: For each contract (declare → deploy → fetch ABI)
    DeployScript->>StarknetRPC: declare(contractClass)
    StarknetRPC-->>DeployScript: classHash / declareTx
    DeployScript->>StarknetRPC: deploy(contract, constructor_args)
    StarknetRPC-->>DeployScript: deploymentTx / address
    DeployScript->>StarknetRPC: getClassAt(address)  %% fetch ABI
    StarknetRPC-->>DeployScript: classDefinition / abi
    DeployScript->>FS: writeFile("contracts/L2/abi/{contractName}.abi.json", abi)
    FS-->>DeployScript: write confirmation
    Note right of DeployScript: logs "Processing {contractName}" and "Saving ABI for {contractName} to {outPath}"
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Assessment against linked issues

Objective Addressed Explanation
Redeploy L2 contracts using the deploy script (#117)
Update README with contracts (#117)
Extract ABI JSONs for each contract to L2/abi/ (#117)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Removed debug println! lines in append_withdrawal_hash (contracts/L2/src/core/ZeroXBridgeL2.cairo) Debug-output removal is not required by #117 and is not part of redeployment/ABI extraction objectives.
StarkNet SDK bump in contracts/L2/package.json Tooling dependency upgrade is not specified in #117 (redeploy/README/ABI) and is outside the stated objectives.

Possibly related PRs

Suggested reviewers

  • JoE11-y
  • Ugo-X

Poem

"I nibble bytes and hop on keys,
RPCs now hum with v0_8 breeze.
ABIs snug in tidy rows,
Deploy logs glow where progress shows.
I thump my paw — the bridge still goes!" 🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c5a74ab and 7502d0f.

📒 Files selected for processing (1)
  • contracts/L2/scripts/deploy_l2.ts (9 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
contracts/L2/scripts/deploy_l2.ts (1)
contracts/L1/scripts/deploy_l1.ts (1)
  • deploymentTestnet (298-321)
🔇 Additional comments (6)
contracts/L2/scripts/deploy_l2.ts (6)

14-16: RPC defaults correctly bumped to v0_8 (Sepolia/Mainnet).

Matches the PR goal to update RPCs; sensible fallbacks for interactive prompts.


356-365: Config plumbed into declareAndDeploy — good integration point.

Passing config here centralizes env/RPC concerns for later steps (ABI fetch/save).


403-416: ProofRegistry deploy signature and call updated to take config — LGTM.

Keeps the orchestration consistent with the new declareAndDeploy signature.


432-436: L2Oracle deploy uses owner from config — OK.

Constructor args are simple felts; no issues expected.


452-456: xZBERC20 deploy mirrors L2Oracle pattern — OK.

Consistent constructor handling.


548-558: deployAllContracts callsite updated for ProofRegistry — consistent with new signature.

No issues spotted.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@truthixify truthixify marked this pull request as ready for review August 26, 2025 13:08
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
contracts/L2/scripts/deploy_l2.ts (1)

14-16: RPC defaults updated to v0_8 are appropriate; consider tightening devnet URL and adding a chain sanity check.

  • Good update to v0_8 endpoints for sepolia/mainnet.
  • Optional: Devnet often expects the /rpc path; using it avoids 404s on some builds.
  • Optional: Log chainId early to fail fast if a wrong RPC is supplied.

Apply this minimal tweak if you want the devnet default to be explicit:

 const DEFAULT_RPC_URLS = {
-    sepolia: "https://starknet-sepolia.public.blastapi.io/rpc/v0_8",
-    mainnet: "https://starknet-mainnet.public.blastapi.io/rpc/v0_8", 
-    devnet: "http://127.0.0.1:5050"
+    sepolia: "https://starknet-sepolia.public.blastapi.io/rpc/v0_8",
+    mainnet: "https://starknet-mainnet.public.blastapi.io/rpc/v0_8",
+    devnet: "http://127.0.0.1:5050/rpc"
 };

If you decide to add a chain sanity check (outside this hunk), you can do:

// After constructing provider
const { chainId } = await provider.getChainId();
console.log(`Connected to chainId: ${chainId}`);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 38e9554 and 9e38f5c.

⛔ Files ignored due to path filters (2)
  • contracts/L2/package-lock.json is excluded by !**/package-lock.json
  • contracts/L2/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (5)
  • contracts/L2/package.json (1 hunks)
  • contracts/L2/scripts/.deploy-config-sepolia.json (1 hunks)
  • contracts/L2/scripts/deploy_l2.ts (2 hunks)
  • contracts/L2/scripts/deployments-sepolia.json (1 hunks)
  • contracts/L2/src/core/ZeroXBridgeL2.cairo (0 hunks)
💤 Files with no reviewable changes (1)
  • contracts/L2/src/core/ZeroXBridgeL2.cairo
🧰 Additional context used
🧬 Code graph analysis (4)
contracts/L2/scripts/.deploy-config-sepolia.json (1)
contracts/L1/scripts/deploy_l1.ts (2)
  • deploymentTestnet (298-321)
  • DeploymentConfig (34-38)
contracts/L2/scripts/deploy_l2.ts (1)
contracts/L1/scripts/deploy_l1.ts (1)
  • deploymentTestnet (298-321)
contracts/L2/package.json (1)
contracts/L1/scripts/deploy_l1.ts (1)
  • deployAllContracts (250-293)
contracts/L2/scripts/deployments-sepolia.json (1)
contracts/L1/scripts/deploy_l1.ts (3)
  • deployAllContracts (250-293)
  • deploymentTestnet (298-321)
  • main (375-407)
🔇 Additional comments (4)
contracts/L2/package.json (1)

24-24: No action needed: starknet@7.6.4 is fully compatible with your current setup

All checks pass for CJS/ESM support and Node version:

  • Runtime Node version is v24.3.0 (≥18), so conditional exports are supported.
  • contracts/L2/package.json has no "type" field (defaults to CJS), matching your CommonJS build.
  • contracts/L2/tsconfig.json uses
    compilerOptions.module = "CommonJS"
    compilerOptions.moduleResolution = "node"
    which will correctly resolve the CJS entry (dist/index.js) under "exports".requirerun1
  • The published starknet@7.6.4 package declares:
    "main": "dist/index.js"
    "module": "dist/index.mjs"
    • Conditional exports for both import (ESM) and require (CJS) entrypoints run2

Your deploy scripts and TS/ts-node setup can continue importing via CommonJS without any ESM-only or Node-version constraints.

contracts/L2/scripts/deploy_l2.ts (1)

363-363: Per-contract header log is a nice DX improvement.

The additional header improves traceability across declare/deploy steps during long runs.

contracts/L2/scripts/.deploy-config-sepolia.json (1)

3-5: ✔ Configuration Consistency Verified

All automated checks passed for contracts/L2/scripts/.deploy-config-sepolia.json:

  • minRate (1 × 10¹⁸) ≤ maxRate (2 × 10¹⁸)
  • accountAddress and owner are valid hex strings and match each other

Please ensure your STARKNET_PRIVATE_KEY corresponds to the configured accountAddress before deploying.

contracts/L2/scripts/deployments-sepolia.json (1)

3-8: Review completed: timestamps and formatting validated

  • No timestamps exceed the current UTC time (all ≤ 1756214192510), so there are no future-dated entries.
  • Every address, classHash, and deploymentTx field is correctly formatted as a hex string.
  • ZeroXBridgeL2 still has declareTx: "already_declared" but a new classHash. Please verify on-chain via StarkNet RPC (e.g. starknet_getClassHashAt) that this reflects an intentionally pre-declared class and not a deployment mismatch.

@JoE11-y
Copy link
Contributor

JoE11-y commented Aug 26, 2025

Hi @truthixify help update

https://github.com/Explore-Beyond-Innovations/ZeroXBridge_Contracts/blob/main/contracts/L2/README.md

With the latest contracts.

And you forgot to dump the abi files

Copy link
Contributor

@JoE11-y JoE11-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just finish it up and this is ready to merge

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
contracts/L2/scripts/deploy_l2.ts (2)

334-337: Constructor calldata must be compiled; raw u256 objects will fail.

account.deployContract expects constructorCalldata as a flattened array (felt[]). Passing objects like {low, high} for u256 without compilation will break especially for ZeroXBridgeL2’s min_rate/max_rate.

Compile the args before deploy:

-  const deployResponse = await account.deployContract({
-      classHash: classHash,
-      constructorCalldata: constructorArgs,
-  });
+  const constructorCalldata = CallData.compile(constructorArgs);
+  const deployResponse = await account.deployContract({
+      classHash,
+      constructorCalldata,
+  });

No other call sites need changing; this covers L2Oracle/xZBERC20 (felt) and ZeroXBridgeL2 (u256 structs) uniformly.

Also applies to: 483-490


1-1: Ensure README.md Includes All Deployed Contract Addresses

The automated consistency check against contracts/L2/scripts/deployments-sepolia.json reveals that L2Oracle and ProofRegistry are missing from contracts/L2/README.md, causing a mismatch in documented vs. actual deployed addresses.

Please update contracts/L2/README.md to include the following entries (sorted to match the JSON):

 L2Bridge=0x58bdc4e4f39b648c01761324247d98ea68bc9fd5e3541e732d146385e575a63
 xZBERC20=0x26cfc43ee6e47541c1de22e91382c14c2c524de52d6abdd1275e7b37cb01276
+L2Oracle=0x1e4acab001e40d194f15927bb0e832887a219809d0be6cf308f3e41a4cfd246
+ProofRegistry=0x3a5d9d2fce8a9dac6a6b5c8cade5668b19e30248611159c7788236a49ce8b9a

– File to update:
contracts/L2/README.md

🧹 Nitpick comments (13)
contracts/L2/README.md (2)

62-63: RPC bump to v0_8 looks good, but .env example still shows v0_7 — please align.

Default RPC URLs are now v0_8. The “Environment Setup” example earlier still uses /v0_7, which can mislead deployers.

Update the .env snippet to v0_8 (illustrative snippet):

# Starknet Configuration
STARKNET_PRIVATE_KEY=your_private_key_here
STARKNET_ACCOUNT_ADDRESS=your_account_address_here
STARKNET_RPC_URL=https://starknet-sepolia.public.blastapi.io/rpc/v0_8

71-77: Verified consistency of deployed addresses – All four contract addresses in contracts/L2/README.md match those in contracts/L2/scripts/deployments-sepolia.json, so there’s no drift at the moment.

You may still want to automate or simplify this section to prevent future mismatches:

  • Option 1: Generate the markdown table (or list) directly from deployments-sepolia.json in CI (e.g. via a small script) so it’s always up to date.
  • Option 2: Link to the JSON file and include only a brief summary in the README (for example, “See the full list of deployed addresses in deployments-sepolia.json”).
contracts/L2/abi/ProofRegistry.abi.json (1)

21-77: Confirm external mutator access policy for register_deposit_proof.

ABI alone doesn’t convey authorization. If anyone can call and write the same commitment twice, ensure idempotency and proper revert on conflicts. If restricted, please confirm the guard (e.g., proof submitter allowlist).

contracts/L2/abi/L2Oracle.abi.json (1)

35-79: Please confirm only-owner enforcement on setters.

Given set_total_tvl and set_relayer are external, verify the implementation enforces onlyOwner (or equivalent) and emits the corresponding events consistently.

contracts/L2/abi/xZBERC20.abi.json (1)

118-121: AccessControl and ERC20 mixins present — verify mint/burn gating matches bridge design.

Please confirm:

  • mint is restricted to the bridge (or a dedicated MINTER_ROLE),
  • burn is restricted appropriately (caller’s own balance vs. bridge-controlled burn-from),
  • set_bridge_address is owner- or admin-only.

Also applies to: 355-549

contracts/L2/scripts/deployments-sepolia.json (1)

1-33: Consider adding metadata for reproducibility and CI drift checks.

Optional enhancements:

  • Add compilerVersion and cairo/oz component versions used,
  • Add abiSaved: true and abiCommit hash to tie ABIs to deployments,
  • Add a simple schemaVersion field.
contracts/L2/scripts/deploy_l2.ts (7)

19-21: Make state/config file paths deterministic regardless of cwd.

getConfigFilename/getDeploymentsFilename return relative scripts/*.json, which depends on process cwd. Running the CLI from repo root will write to ./scripts instead of contracts/L2/scripts.

-const getConfigFilename = (network: string) => `scripts/.deploy-config-${network}.json`;
-const getDeploymentsFilename = (network: string) => `scripts/deployments-${network}.json`;
+const getConfigFilename = (network: string) =>
+  path.join(__dirname, `.deploy-config-${network}.json`);
+const getDeploymentsFilename = (network: string) =>
+  path.join(__dirname, `deployments-${network}.json`);

save/load functions already ensure directories; this change makes outputs consistently land under contracts/L2/scripts/.

Also applies to: 153-170, 190-199


283-285: Use utf8 when reading JSON files.

toString("ascii") risks mangling non-ASCII characters. utf8 is standard and safer for JSON.

-const sierraContract = json.parse(fs.readFileSync(sierraPath).toString("ascii"));
-const casmContract = json.parse(fs.readFileSync(casmPath).toString("ascii"));
+const sierraContract = json.parse(fs.readFileSync(sierraPath, "utf8"));
+const casmContract = json.parse(fs.readFileSync(casmPath, "utf8"));

301-317: Broaden "already declared" handling to be more robust.

Relying on error.message string matching is brittle. starknet.js can surface provider error structures with different wording.

  • Check for error.code/classAlreadyDeclared-like markers if present (e.g., error.response?.data?.error?.code).
  • As a fallback, if declare fails, query getClassByHash to confirm existence and proceed.

If you want, I can draft a helper normalizeStarknetError(e) to centralize this.


531-541: Optional: reuse the existing provider via account.provider.

You don’t need to instantiate an extra RpcProvider in declareAndDeploy; account.provider implements getClassAt.

-const rpc = new RpcProvider({ nodeUrl: config.starknetRpcUrl! });
-const { abi } = await rpc.getClassAt(address);
+// Reuse the existing provider
+const { abi } = await (account as any).provider.getClassAt(address);

If you prefer type safety, type the provider as ProviderInterface.


500-527: Post-deploy relationship setup — LGTM with a minor improvement.

execute + wait is correct. Consider also logging the transaction hash to aid debugging and explorers.

- spinner.info("Bridge address set in xZBERC20 contract");
+ spinner.info(`Bridge address set in xZBERC20 contract (tx: ${response.transaction_hash})`);

590-602: Interactive flows are fine; consider a non-interactive mode for CI.

You already support --no-config. A future enhancement is to accept all config via env/flags to run headless in CI, skipping ask() prompts.

If useful, I can add a --ci flag that forces defaults/envs and errors out if required values are missing instead of prompting.

Also applies to: 607-627, 632-643


581-585: Tiny UX nit: use path.resolve for displayed filenames.

Printing absolute paths reduces confusion about where files were written if cwd varies.

- console.log(`💾 Deployment state saved to: ${deploymentsFilename}`);
- console.log(`⚙️  Configuration saved to: ${configFilename}\n`);
+ console.log(`💾 Deployment state saved to: ${path.resolve(deploymentsFilename)}`);
+ console.log(`⚙️  Configuration saved to: ${path.resolve(configFilename)}\n`);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9e38f5c and c5a74ab.

📒 Files selected for processing (7)
  • contracts/L2/README.md (1 hunks)
  • contracts/L2/abi/L2Oracle.abi.json (1 hunks)
  • contracts/L2/abi/ProofRegistry.abi.json (1 hunks)
  • contracts/L2/abi/ZeroXBridgeL2.abi.json (1 hunks)
  • contracts/L2/abi/xZBERC20.abi.json (1 hunks)
  • contracts/L2/scripts/deploy_l2.ts (9 hunks)
  • contracts/L2/scripts/deployments-sepolia.json (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
contracts/L2/scripts/deployments-sepolia.json (1)
contracts/L1/scripts/deploy_l1.ts (2)
  • deployAllContracts (250-293)
  • main (375-407)
contracts/L2/scripts/deploy_l2.ts (1)
contracts/L1/scripts/deploy_l1.ts (1)
  • DeploymentConfig (34-38)
🪛 LanguageTool
contracts/L2/README.md

[grammar] ~62-~62: There might be a mistake here.
Context: ... #### Default RPC URLs: - Sepolia: https://starknet-sepolia.public.blastapi.io/rpc/v0_8 - Mainnet: `https://starknet-mainnet.pub...

(QB_NEW_EN)


[grammar] ~63-~63: There might be a mistake here.
Context: ...ic.blastapi.io/rpc/v0_8- **Mainnet**:https://starknet-mainnet.public.blastapi.io/rpc/v0_8` - Devnet: http://127.0.0.1:5050 ## D...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cairo starknet foundry tests
🔇 Additional comments (11)
contracts/L2/abi/ProofRegistry.abi.json (1)

1-7: ABI structure is coherent and minimal — good separation of concerns.

The interface cleanly exposes read functions and a single write path; event naming is precise.

contracts/L2/abi/L2Oracle.abi.json (2)

1-7: LGTM on public surface and Ownable integration.

The ABI exposes clear TVL getters/setters and relayer management with Ownable mixin present.


150-251: Event surface is complete and consistent.

Event typing and the unified Event enum composition are well-structured; this should ease indexer integration.

contracts/L2/abi/xZBERC20.abi.json (1)

740-765: Unified Event enum is well-flattened for indexers.

Nice flattening across ERC20, AccessControl, SRC5, and Upgradeable events — this aids analytics.

contracts/L2/scripts/deployments-sepolia.json (2)

1-33: Cross-check with README — currently consistent.

Oracle/ProofRegistry/xZBERC20/ZeroXBridgeL2 addresses here match the README. Good job keeping them in sync.


3-8: Timestamps sanity check: actual UTC times
I converted each millisecond value in contracts/L2/scripts/deployments-sepolia.json to UTC and got:

  • ProofRegistry (line 3): 2025-08-26T13:34:20Z
  • L2Oracle (line 4): 2025-08-26T13:34:53Z
  • xZBERC20 (line 5): 2025-08-26T13:35:25Z
  • ZeroXBridgeL2 (line 6): 2025-08-26T13:36:37Z

These all fall minutes ago on Aug 26 2025. Please confirm they match your actual Sepolia deployment logs (and aren’t placeholder or accidentally future-dated) before merging.

contracts/L2/scripts/deploy_l2.ts (4)

14-15: RPC bumped to v0_8 — LGTM.

Matches the README and aligns with starknet.js 7.x. No changes needed.


548-558: Call-site updates look consistent.

All deploy* functions now pass config through to declareAndDeploy. Good propagation and consistent logging.

Also applies to: 403-416, 432-436, 453-456, 492-495


106-147: Private key guard — good. Also default behavior on blank input is sensible.

The “load config?” default to yes when input is blank is a nice UX touch.


532-585: Nice final summary output.

Clear, readable deployment recap and file locations. No action needed.

contracts/L2/abi/ZeroXBridgeL2.abi.json (1)

1-679: ABI surface looks coherent and complete for Cairo 1.

Interfaces/events cover mint/burn, dynamic rates, Merkle verification, upgradeability, and ownership. No structural issues spotted. Good to commit.

@truthixify
Copy link
Contributor Author

Check now @JoE11-y @Ugo-X

Copy link
Contributor

@JoE11-y JoE11-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@JoE11-y JoE11-y merged commit 366215b into Explore-Beyond-Innovations:main Aug 26, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

L2 CONTRACTS RE-DEPLOYMENT

2 participants